package com.dreem.prototype.improve;

/**
 * @program: DesignParrtern
 * @description: 绵羊类
 * @author: Peng
 * @create: 2021-01-28  11:30
 **/
public class Sheep implements Cloneable{
    private String name = "hkjh";
    private String no = "00003";
    private int age = 2;
    private Sheep friend = null;

    public Sheep(){
    }

    public Sheep(int age, String name, String no){
        this.age = age;
        this.name = name;
        this.no = no;
    }
    public void setFriend(Sheep friend){
        this.friend = friend;
    }

    public Sheep getFriend() {
        return friend;
    }

    @Override
    public Sheep clone() throws CloneNotSupportedException {
        return (Sheep) super.clone();
    }
}
